package com.citcc.business.service;

import java.util.List;

import com.citcc.business.bean.CdzChargingEntity;
import com.citcc.business.bean.CdzChargingEntityExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.citcc.business.mapper.CdzChargingEntityMapper;

/**
 * 充电信息
 *
 * @author liyachong
 * @date 2019-04-11
 */
@Service
public class CdzChargingService {
    @Autowired
    private CdzChargingEntityMapper cdzChargingEntityMapper;

    /**
     * 根据id查询充电信息
     * @param id
     * @return
     */
    public CdzChargingEntity selectCdzChargingEntityById(String id) {
        return cdzChargingEntityMapper.selectByPrimaryKey(id);
    }

    /**
     * 查询充电信息列表
     * @param example
     * @return
     */
    public List<CdzChargingEntity> selectCdzChargingEntityList(CdzChargingEntityExample example) {
        return cdzChargingEntityMapper.selectByExample(example);
    }

    /**
     * 插入充电信息
     * @param cdzChargingEntity
     * @return
     */
    public int insertCdzChargingEntity(CdzChargingEntity cdzChargingEntity) {
        return cdzChargingEntityMapper.insert(cdzChargingEntity);
    }

    /**
     * 修改
     * @param cdzChargingEntity
     * @return
     */
    public int updateCdzChargingEntity(CdzChargingEntity record,CdzChargingEntityExample example) {
        return cdzChargingEntityMapper.updateByExampleSelective(record, example);
    }
    
    /**
     * 根据id更新
     * @param record
     * @return
     */
    public int updateCdzChargingEntityById(CdzChargingEntity record) {
        return cdzChargingEntityMapper.updateByPrimaryKeySelective(record);
    }

    

}
